package com.wind.logger;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.security.PermissionCollection;

public class Reflection {

	public static void main(String[] args) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException{
		Object child = Child.class.newInstance();
		Parent.class.getDeclaredMethod("set", null).invoke(child, null);
//		PermissionCollection premissionCollection = Parent.class.getProtectionDomain().getPermissions();
		for(Method method: Parent.class.getDeclaredMethods()){
			System.out.println(method.getName());
		}
//		Child.class.getgetDeclaredMethod("print", null).invoke(child, null);
		
	}
	
}

class Parent{
	
	protected void print(){
		System.out.println("Parent");
	}
	
	private void set(){
		
	}
	
}

class Child extends Parent{
	
	private void get(){
		
	}
	
}